package com.sky.entity;

import com.sky.anotion.ValidId;
import com.sky.anotion.validator.AddGroup;
import com.sky.anotion.validator.UpdateGroup;
import com.sky.enumeration.ValidIdType;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
public class Dict implements Serializable {
    @ValidId(groups = {UpdateGroup.class})
    private String id; // 字典id
    /**父字典id*/
    private String pid;
    /**自典名称*/
    private String name;
    /**编码*/
    @NotBlank(message = "字典编码不能为空",groups = {AddGroup.class, UpdateGroup.class})
    private String dictCode;
    /**描述*/
    private String desc;
    /**分类类型*/
    private String type;
    /**数据字典的值*/
    private Integer value;
}
